/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.web.users.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.pingan.haofang.gov.sm.account.common.constant.AccountConstants;

/**
 * 创建用户
 *
 * @author zhangbi617
 * @date 22/05/2017
 */
@ApiModel(description = "创建用户表单")
public class RegisterAccountForm {

	@NotBlank
	@Length(max = 6, min = 6, message = "msg.auth.code.length.illegal")
	@ApiModelProperty(value = "短信验证码", required = true)
	private String msgAuthCode;

	@NotBlank
	@ApiModelProperty(value = "密码", required = true)
	private String password;

	@NotBlank(message = "account.field.mobile.isnull")
	@Pattern(regexp = AccountConstants.MOBILE_PATTERN, message = "account.field.mobile.pattern.error")
	@ApiModelProperty(value = "手机号", required = true)
	private String mobile;

	@ApiModelProperty(value = "邮箱", required = true)
	private String email;

	public String getMsgAuthCode() {
		return msgAuthCode;
	}

	public void setMsgAuthCode(String msgAuthCode) {
		this.msgAuthCode = msgAuthCode;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "RegisterAccountForm [msgAuthCode=" + msgAuthCode + ", password=" + password + ", mobile=" + mobile
				+ ", email=" + email + "]";
	}

}
